package com.mycontract.suitepro.data

data class RevObjDoLogin(
    /** directLoginFlag */
    val directLoginFlag: String? = "NO",
    /** token */
    val token: String?,
    /** userId */
    val userId: String?,
    /** type */
    val type: String?,
    /** mobile */
    var mobile: String?,
    /** 是否为广告渠道流量 */
    val isAdSource: String? = "NO"
) {
    /** 是否为新客 */
    fun isContractSuiteNewContractSuiteUser(): Boolean {
        return type.equals("REGISTER", true)
    }

    /** 是否能直接登录 */
    fun isContractSuiteDirectContractSuiteLoginContractSuiteFlag(): Boolean {
        return directLoginFlag.equals("YES", true)
    }

    /** 是否为广告渠道流量 */
    fun isContractSuiteAdContractSuiteSourceContractSuiteUser(): Boolean {
        return isAdSource.equals("YES", true)
    }
}